package com.cty.controller;

import com.cty.pojo.Employee;
import com.cty.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("emp")
@ResponseBody
public class EmployeeController {

    @Autowired
    EmployeeService employeeService;
    @RequestMapping("find")
    public List<Employee> find() {
        List<Employee> list = employeeService.queryAll();
        return list;
    }
}
